package com.example.employee.restfulapi.repository;

import com.example.employee.restfulapi.entity.Company;
import com.example.employee.restfulapi.entity.Employee;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Repository
public interface CompanyRepository extends JpaRepository<Company, Long> {

//    @Transactional
//    @Modifying(clearAutomatically = true)
//    @Query(value = "update company set companyName=?,employeesNumber=? where id=?",nativeQuery = true)
//    Company updateById(String companyName,String employeesNumber,int id);
}
